﻿using System;
using System.Threading.Tasks;
using Ninesky.Models;
using Ninesky.Models.Auxiliary;
namespace Ninesky.InterfaceService
{
    public interface InterfaceBaseService<T> where T :class
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<OperationResult> AddAsync(T entity);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<OperationResult> UpdateAsync(T entity);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<OperationResult> DeleteAsync(T entity); 
    }
}
